﻿using System;
using System.Collections;
using System.Collections.Generic;
using CookComputing.XmlRpc;

namespace Drupalxmlrpc
{
    [XmlRpcMissingMapping(MappingAction.Ignore)]
    public struct StringField
    {
        private string name;

        private List<StringStruct> gateway;

        public StringField(string name)
        {
            this.name = name;
            gateway = new List<StringStruct>();
        }

        public void Add(string value)
        {
            gateway.Add(new StringStruct(name, value));
        }

        public StringStruct[] GetData()
        {
            return gateway.ToArray();
        }
    }
}